---
title: TypeScript
excerpt: Built-in types for JSON:API resources
weight: 8
---

```ts
// DrupalNode
const article = await drupal.getResource<DrupalNode>(
  "node--article",
  "907034d4-ab35-4949-84e4-d2b7afed82df"
)
```

```ts
// DrupalTaxonomyTerm
const tags = await drupal.getResourceCollection<DrupalTaxonomyTerm[]>(
  "taxonomy_term--tags"
)
```

```ts
// Any resource type.
const resources =
  await drupal.getResourceCollection<JsonApiResource[]>("entity--bundle")
```
